<!doctype html>
<html lang="zh" translate="no">

<head>
    <title>
        非可用户中心
    </title>
    <meta charset="utf-8">
    <link href="/static/uc/css/theme.css" rel="stylesheet">
    <link href="/static/uc/lib/layui/css/layui.css" rel="stylesheet">
    <link href="/static/uc/css/rovecoder.css" rel="stylesheet">
    <script src="/static/uc/lib/jquery/jquery.min.js"></script>
    <script src="/static/uc/lib/toastr/toastr.min.js"></script>
    <link href="/static/uc/lib/toastr/toastr.min.css" rel="stylesheet">
    <script src="/static/uc/lib/layui/layui.js"></script>
    <script src="/static/uc/js/rovecoder.js"></script>

    <?php
    if (is_sys_admin() && request()->get('layout', '') == 'layout') {
    ?>
        <link href="/static/uc/css/indexlayout.css" rel="stylesheet">
        <script src="/static/uc/js/indexlayout.js"></script>
    <?php

    }
    ?>


</head>

<body>



    <div class="widgets" area="1">

        <?php
        if (isset($layouts[1])) {
            foreach ($layouts[1] as $layout) {
                if ($layout['type'] == 2) {
        ?>
                    <div class="widget" type="2"><?php echo $layout['html'] ?></div>
                <?php
                } else {
                ?>
                    <div class="widget" type="1"><?php echo widget('uc/' . $layout['widgetident']) ?></div>

        <?php
                }
            }
        }
        ?>


    </div>

    <header>
        <div class="rc-container">
            <div class="rc-flex rc-flex-between">
                <div class="logo">
                    <img style="max-height: 60px;" src="<?php echo $SyscnfUcenterinfo['ucenterlogo'] ?>" />

                </div>

                <div class="rc-flex personal_bar">
                    <div class="rc-dropdown">
                        <a class="notice rc-dropbtn personal_bar_menu" id="notice">
                            <img src="/static/uc/images/notice.png" />
                            <?php if ($messageUnreadCount > 0) {
                            ?>
                                <span class="layui-badge-dot"></span>
                            <?php
                            } ?>


                        </a>

                        <div class="rc-dropdown-content  layui-anim layui-anim-downbit layui-panel message">
                            <ul>
                                <li>
                                    <a href="/uc/UserMessage/system">
                                        系统消息
                                        <?php if ($messageUnreadCount > 0) {
                                        ?>
                                            <span class="layui-badge"><?php echo $messageUnreadCount; ?></span>
                                        <?php
                                        } ?>

                                    </a>

                                </li>
                            </ul>
                        </div>


                    </div>

                    <div class=" rc-dropdown">
                        <a class="rc-dropbtn personal_bar_menu" id="notice">
                            <img src="/static/uc/images/avatar.png" />
                        </a>

                        <div class="rc-dropdown-content personal_tool_box  layui-anim layui-anim-downbit layui-panel">
                            <div class="  personal_info">
                                <div class="rc-flex rc-flex-item-center ">
                                    <div class="avatar">
                                        <img src="<?php echo $userBasicInfo && $userBasicInfo['avatar'] ? $userBasicInfo['avatar'] : '/static/uc/images/avatar.png' ?>" />

                                    </div>
                                    <div class="username">
                                        <?php echo request()->userinfo['username']; ?>
                                    </div>
                                </div>
                                <?php if (isset($nowGrade) &&  $nowGrade['nextPoints'] > 0) {
                                ?>
                                    <div class="vipgrade">
                                        <div class="rc-flex rc-flex-between rc-flex-item-center ">
                                            <div>会员等级：
                                                <span>
                                                    <?php if ($nowGrade['icon']) {
                                                    ?>
                                                        <img class="vipicon" src="<?php echo $nowGrade['icon'] ?>" />
                                                    <?php
                                                    } else {
                                                        echo $nowGrade['title'];
                                                    } ?>

                                                </span>
                                            </div>

                                            <div><?php echo request()->userinfo['integral']; ?>/<?php echo $nowGrade['nextPoints'] ?></div>

                                        </div>

                                        <div class="progress_box">
                                            <div class="layui-progress">
                                                <div class="layui-progress-bar" lay-percent="<?php echo request()->userinfo['integral'] / $nowGrade['nextPoints'] * 100; ?>%"></div>
                                            </div>
                                        </div>
                                    </div>

                                <?php
                                } ?>

                            </div>

                            <div class="widgets" area="2">

                                <?php
                                if (isset($layouts[2])) {
                                    foreach ($layouts[2] as $layout) {
                                        if ($layout['type'] == 2) {
                                ?>
                                            <div class="widget" type="2"><?php echo $layout['html'] ?></div>
                                        <?php
                                        } else {
                                        ?>
                                            <div class="widget" type="1"><?php echo widget('uc/' . $layout['widgetident']) ?></div>

                                <?php
                                        }
                                    }
                                }
                                ?>

                            </div>

                            <div class="rc-flex rc-flex-between logout">
                                <div><a href="/uc/personal/index">我的资料</a></div>

                                <div><a href="/uc/Logreg/logout">退出登录</a></div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </header>

    <main>
        <div class="rc-container">
            <div class="layui-row layui-col-space15">
                <div class="layui-col-md2">
                    <div class="menu">
                        <?php $nowurl = strtolower(get_now_url()); ?>

                        <div class="widgets" area="3">


                            <?php
                            if (isset($layouts[3])) {
                                foreach ($layouts[3] as $layout) {
                                    if ($layout['type'] == 2) {
                            ?>
                                        <div class="widget" type="2"><?php echo $layout['html'] ?></div>
                                    <?php
                                    } else {
                                    ?>
                                        <div class="widget" type="1"><?php echo widget('uc/' . $layout['widgetident']) ?></div>

                            <?php
                                    }
                                }
                            }
                            ?>


                        </div>

                        <?php
                        foreach ($firstMenuNode->getSiblingsAndSelf() as $sibling) {
                        ?>

                            <div>
                                <a class="item firstmenu  <?php echo $nowurl == strtolower($sibling->url) ? 'current' : ''; ?>"
                                    href="<?php echo $sibling->url == '' ? 'javascript:;' : $sibling->url; ?>">
                                    <i class="iconfont  <?php echo $sibling->icon ?>"></i> <?php echo $sibling->title ?>
                                    <?php
                                    if ($sibling->hasChildren()) {
                                    ?>
                                        <i class="iconfont icon-xiala " style="float: right;"></i>
                                    <?php
                                    }
                                    ?>

                                </a>
                                <?php
                                if ($sibling->hasChildren()) {
                                ?>
                                    <div class="sec_menu_box">
                                        <?php
                                        $secmenus = $sibling->getChildren();
                                        foreach ($secmenus as $secmenu) {
                                        ?>
                                            <a href="<?php echo $secmenu->url == '' ? 'javascript:;' : $secmenu->url ?>"
                                                class="item secmenu <?php echo $nowurl == strtolower($secmenu->url) ? 'current' : ''; ?> ">
                                                <?php echo $secmenu->title ?>
                                            </a>
                                        <?php
                                        }
                                        ?>

                                    </div>
                                <?php
                                }
                                ?>

                            </div>

                        <?php
                        }

                        ?>




                    </div>

                </div>

                <div class="layui-col-md10">
                    <div class="rightbody">
                        <?php include $template ?>
                    </div>
                </div>

            </div>
        </div>


    </main>

    <?php
    if (is_sys_admin() && request()->get('layout', '') == 'layout') {
    ?>
        <div class="save-layout-bar">
            <button class="layui-btn layui-btn-primary" id="save-layout">保存布局</button>
            <a class="layui-btn " href="/uc/Index/index">完成布局</a>
            <a class="layui-btn " href="/uc/Index/index" id="" target="_blank">预览</a>
        </div>
    <?php
    }
    ?>



</body>

</html>